#!/bin/bash
[[ ! -f /var/log/.disk_messages ]]  &&  touch /var/log/.disk_messages
if [[ $2 = "ok" ]] ; then
cat  /var/log/.disk_messages_all   /var/log/.disk_messages  /var/log/.disk_messages  |sort |uniq -u |grep -Ei "$1" >> /var/log/.disk_messages
fi
cat /var/log/messages   |grep -Ei "$1"  >> /var/log/.disk_messages_all 
cat /var/log/.disk_messages_all |sort -u -o /var/log/.disk_messages_all 
cat /var/log/.disk_messages_all  /var/log/.disk_messages  /var/log/.disk_messages  |sort |uniq -u |grep -Ei "$1"
